﻿@model IEnumerable<PerformanceAssessment.Models.Goal>

@{
    ViewBag.Title = "Index";
}

<h2>Goals</h2>

<h3>Current Period Goals</h3>
<table>
    <tr>
        <th>
            #
        </th>
        <th>
            Specific Description
        </th>
        <th>
            Measurable Description
        </th>
        <th>
            Attainable Description
        </th>
        <th>
            Relevant Description
        </th>
        <th>
            Timely Description
        </th>
        <th></th>
    </tr>

@for(int i = 0; i < Model.Count(); i++) {
    <tr>
        <td>
            @(i+1)
        </td>
        <td>
            @Html.DisplayFor(modelItem => Model.ElementAt(i).SpecificDescription)
        </td>
        <td>
            @Html.DisplayFor(modelItem => Model.ElementAt(i).MeasurableDescription)
        </td>
        <td>
            @Html.DisplayFor(modelItem => Model.ElementAt(i).AttainableDescription)
        </td>
        <td>
            @Html.DisplayFor(modelItem => Model.ElementAt(i).RelevantDescription)
        </td>
        <td>
            @Html.DisplayFor(modelItem => Model.ElementAt(i).TimelyDescription)
        </td>
        <td>
            @Html.ActionLink("Open", "Edit", new { goalId = Model.ElementAt(i).ID, assessmentId = ViewBag.assessmentId })
        </td>
    </tr>
}

</table>

<h3>Previous Period Goals</h3>
<table>
    <tr>
        <th>
            #
        </th>
        <th>
            Specific Description
        </th>
        <th>
            Measurable Description
        </th>
        <th>
            Attainable Description
        </th>
        <th>
            Relevant Description
        </th>
        <th>
            Timely Description
        </th>
        <th></th>
    </tr>

@for(int i = 0; i < ViewBag.previousGoals.Count; i++) {
    <tr>
        <td>
            @(i+1)
        </td>
        <td>
            @Html.Label((string)ViewBag.previousGoals[i].SpecificDescription)
        </td>
        <td>
            @Html.Label((string)ViewBag.previousGoals[i].MeasurableDescription)
        </td>
        <td>
            @Html.Label((string)ViewBag.previousGoals[i].AttainableDescription)
        </td>
        <td>
            @Html.Label((string)ViewBag.previousGoals[i].RelevantDescription)
        </td>
        <td>
            @Html.Label((string)ViewBag.previousGoals[i].TimelyDescription)
        </td>
        <td>
            @Html.ActionLink("Open", "Edit", new { goalId = ViewBag.previousGoals[i].ID, assessmentId = ViewBag.assessmentId })
        </td>
    </tr>
}
</table>

<div>
    @Html.ActionLink("Back to Assessment", "Details", "Assessments", new { assessmentId = ViewBag.assessmentId }, null)
</div>
